TYPE
text
textAn immutable character string data type.
Since
0.6.0
Methods
charAt
Retrieves the 16-bit code of the character at the specified index within this text.
char_at
Retrieves the 16-bit code of the character at the specified index within this text.
compareTo
Compares this text to another text lexicographically, based on the Unicode value of each character
compare_to
Compares this text to another text lexicographically, based on the Unicode value of each character
contains
Checks if this text contains the specified substring.
empty
Returns true if this text is empty, false otherwise.
encode
Converts this text to an array of UTF-8 encoded bytes.
endsWith
Checks if this text ends with the specified suffix.
ends_with
Checks if this text ends with the specified suffix.
format
Uses this text as a format string and returns the text obtained by substituting the specified
from_bytes
Create a text representation of the given bytes.
indexOf
Search for the first occurrence of the specified substring within this text.
index_of
Search for the first occurrence of the specified substring within this text.
lastIndexOf
Returns the index within this text of the last occurrence of the specified string,
last_index_of
Returns the index within this text of the last occurrence of the specified string,
len
Returns the number of characters in this text.
like
Matches this text against the specified SQL LIKE pattern.
lowerCase
Returns the text obtained by converting all alphabetic characters in this text to lower case.
lower_case
Returns the text obtained by converting all alphabetic characters in this text to lower case.
match_groups
Match this text against the specified regular expression, returning all match groups in a list.
match_named_groups
Match this text against the specified regular expression, returning a map whose keys are the names
matches
Matches this text against the specified regular expression.
regex_replace
Returns the text obtained by replacing all subsequences in this text which match the given regular
repeat
Repeat this text n times. SQL compatible.
replace
Returns the text obtained by replacing all occurrences of the substring oldvalue in this text
reversed
Returns a reversed copy of this text. SQL compatible.
size
Returns the number of characters in this text.
split
Splits this text around matches of the given delimiter.
startsWith
Checks if this text starts with the specified prefix.
starts_with
Checks if this text starts with the specified prefix.
sub
Returns a substring of this text starting from the specified index (inclusive).
to_bytes
Converts this text to an array of UTF-8 encoded bytes.
trim
Returns text matching this one, but with leading and trailing whitespace removed.
upperCase
Returns the text obtained by converting all alphabetic characters in this text to upper case.
upper_case
Returns the text obtained by converting all alphabetic characters in this text to upper case.
© 2026 Chromia